laravel check environment hlper

35

if (App::environment('local')) {
    // The environment is local
}

if (App::environment(['local', 'staging'])) {
    // The environment is either local OR staging...
}
if (\Illuminate\Support\Facades\App::environment('production')) {
    // The environment is production
}

Comments

Submit
0 Comments